import request from './request'
import BASEURL from './BaseUrl'
import qs from "qs"
const { URL } = BASEURL
export const Jingpinapi = () => request.get(URL +'/products/recommend')
export const sendsmsapi = (params) => request.post(URL +'/sendSMS',qs.stringify(params))
export const phoneloginapi = (params) => request.post(URL +'/phoneRegin',qs.stringify(params))
export const weixinloginapi = (params) => request.post(URL +'/wechatUsers/PCLogin',qs.stringify(params))
export const bindphoneapi = (params) => request.post(URL +'/wechatUsers/binding',qs.stringify(params))
export const userprofilesapi = (params) => request.get(URL +'/shop/userProfiles')
export const ReMenAPI = () => request.get(URL +"/products/hot");
export const goodsdetailsapi = (id) => request.get(URL +`/products/${id}`);
export const addToCartAPI = (params) =>request.post(URL+"/shop/carts/add", qs.stringify(params));
export const GetGoodsListAPI = (params) => request.get(URL+"/products", { params }); //{params:params}
export const ShowCartAPI = () => request.get(URL+"/shop/carts");
export const deleteTheGoodsAPI = (id) => request.delete(URL+`/shop/carts?productIds=${id}`);
export const GoodSearchApi = (params) => request.get(URL+`/products`,{params})

